ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Core.Data.ExpressionInfo Assembly / GrapeCity.Enterprise.Data.Expressions.Tools Namespace / EnumerableExtensions Class / Flatten Method / Flatten<T>(T,Func<T,IEnumerable<T>>) Method
Item type.
The object of type T.
function that returns a collection of children

In This Topic
    Flatten<T>(T,Func<T,IEnumerable<T>>) Method
    In This Topic
    This method extends the LINQ methods to obtain a single-level collection of descendants(is a collections) of an object of type T
    Syntax
    'Declaration
     
    Public Overloads Shared Function Flatten(Of T)( _
       ByVal source As T, _
       ByVal childSelector As Func(Of T,IEnumerable(Of T)) _
    ) As IEnumerable(Of T)
    public static IEnumerable<T> Flatten<T>( 
       T source,
       Func<T,IEnumerable<T>> childSelector
    )

    Parameters

    source
    The object of type T.
    childSelector
    function that returns a collection of children

    Type Parameters

    T
    Item type.

    Return Value

    Returns a one level list of elements of type T.
    See Also